<template>
  <div 
    v-for="(experience, index) in resumeData.workExperiences" 
    :key="index" 
    class="content-inner" >
    <el-form-item 
      :prop="'workExperiences.' + index + '.company'" 
      :rules="rules.experienceRule.company" 
      label="公司" 
      label-position="top">
      <el-input 
        v-model="experience.company" 
        class="input-item"/>
    </el-form-item>
  </div>

</template>

<script>
  export const rules = () => {
    return {
      experienceRule: {
        company: [
          {required: true, message: '公司名不能为空', trigger: 'blur'},
          {min: 1, max: 128, message: '不能超过 128 个字符', trigger: 'change, blur'},
          {validator: validDangeroutStr, trigger: 'change, blur'}  //validator为自定义校验
        ]
      }
    }
  }
</script>

<style scoped>

</style>
